/************************************************************
	File:		Emitter.h
	Author:		Mitchel Mishiev
	Purpose:	CEmitter class creates the emitter of the Game
************************************************************/

#pragma once
#include "../../SGD Wrappers/CSGD_Direct3D.h"
#include "Particle.h"
#include <vector>
using namespace std;

class CEmitter
{
private:
	int MaxParticle;
	int width;
	int height;
	int PositionX;
	int PositionY;
	vector <CParticle*> particleList;
	int ImageID;
	float MaxLife;
	float MinLife;
	float StartColorAlpha;
	float EndColorAlpha;
	float StartColorRed;
	float EndColorRed;
	float StartColorGreen;
	float EndColorGreen;
	float StartColorBlue;
	float EndColorBlue;
	float StartVelocityX;
	float StartVelocityY;
	float EndVelocityX;
	float EndVelocityY;
	float StartRotation;
	float EndRotation;
	float StartScaleX;
	float EndScaleX;
	float StartScaleY;
	float EndScaleY;

	//Particle
	CParticle* particle;

public:
	CEmitter(void);
	~CEmitter(void);
	CEmitter& operator=( const CEmitter& emit);
	CEmitter( const CEmitter& emit );

	//Resize the Particle List
	void ResizeList( int mParticle );

	//Accessor
	int GetMaxParticle() { return MaxParticle; }
	int GetWidth() { return width; }
	int GetHeight() { return height; }
	int GetX() { return PositionX; }
	int GetY() { return PositionY; }
	vector <CParticle*> GetParticles() { return particleList; }
	int GetID() { return ImageID; }
	float GetMaxLife() { return MaxLife; }
	float GetMinLife() { return MinLife; }
	float GetStartColorAlpha() { return StartColorAlpha; }
	float GetEndColorAlpha() { return EndColorAlpha; }
	float GetStartColorRed() { return StartColorRed; }
	float GetEndColorRed() { return EndColorRed; }
	float GetStartColorGreen() { return StartColorGreen; }
	float GetEndColorGreen() { return EndColorGreen; } 
	float GetStartColorBlue() { return StartColorBlue; }
	float GetEndColorBlue() { return EndColorBlue; }
	float GetStartVelocityX() { return StartVelocityX; }
	float GetStartVelocityY() { return StartVelocityY; }
	float GetEndVelocityX() { return EndVelocityX; }
	float GetEndVelocityY() { return EndVelocityY; }
	float GetStartRotation() { return StartRotation; }
	float GetEndRotation() { return EndRotation; }
	float GetStartScaleX() { return StartScaleX; }
	float GetEndScaleX() { return EndScaleX; }
	float GetStartScaleY() { return StartScaleY; }
	float GetEndScaleY() { return EndScaleY; }



	//Mutator
	void SetMaxParticle( int mParticle ) { MaxParticle = mParticle; }
	void SetWidth( int w ) { width = w; }
	void SetHeight( int h ) { height = h; }
	void SetX( int x ) { PositionX = x; }
	void SetY( int y ) { PositionY = y; }
	void SetParticle( CParticle* id ) { particleList.push_back(id); }
	void SetID( int id ) { ImageID = id; }
	void SetMaxLife( float mLife ) { MaxLife = mLife; }
	void SetMinLife( float mLife ) { MinLife = mLife; }
	void SetStartColorAlpha( float alpha ) { StartColorAlpha = alpha; }
	void SetEndColorAlpha( float alpha ) { EndColorAlpha = alpha; }
	void SetStartColorRed( float red ) { StartColorRed = red; }
	void SetEndColorRed( float red ) { EndColorRed = red; }
	void SetStartColorGreen( float green ) { StartColorGreen = green; }
	void SetEndColorGreen( float green ) { EndColorGreen = green; }
	void SetStartColorBlue( float blue ) { StartColorBlue = blue; }
	void SetEndColorBlue( float blue ) { EndColorBlue = blue; }
	void SetStartVelocityX( float x ) { StartVelocityX = x; }
	void SetStartVelocityY( float y ) { StartVelocityY = y; }
	void SetEndVelocityX( float x ) { EndVelocityX = x; }
	void SetEndVelocityY( float y ) { EndVelocityY = y; }
	void SetStartRotation( float r ) { StartRotation = r; }
	void SetEndRotation( float r ) { EndRotation = r; }
	void SetStartScaleX( float s ) { StartScaleX = s; }
	void SetEndScaleX( float s ) { EndScaleX = s; }
	void SetStartScaleY( float s ) { StartScaleY = s; }
	void SetEndScaleY( float s ) { EndScaleY = s; }

	//Setup the ParticleList
	void SetupParticleList( CEmitter* emitter );
};
